﻿// MIT License
// 开源地址：https://gitee.com/co1024/AbcMvc
// Copyright (c) 2021-2023 1024
// Abc.Mvc=Furion+EF+SqlSugar+Pear layui admin.

namespace Abc.Core.Entities.Files;

/// <summary>
///     文件设置
/// </summary>
[Comment("文件设置")]
[Table("Sys_FileSetting")]
public class SysFileSetting : EFFullEntity, IEntityTypeBuilder<SysFileSetting>
{
    /// <summary>
    ///     文件存储位置（0 本地,1:阿里云，2:腾讯云，3:华为云）
    /// </summary>
    [Comment("文件存储位置")]
    public FileLocationType FileLocation { get; set; }

    /// <summary>
    ///     文件仓库
    /// </summary>
    [Comment("文件仓库")]
    [MaxLength(200)]
    public string Aliyun_FileBucketName { get; set; }

    public string Aliyun_AccessKeyId { get; set; }

    public string Aliyun_AccessKeySecret { get; set; }

    public string Aliyun_Endpoint { get; set; }

    public void Configure(EntityTypeBuilder<SysFileSetting> entityBuilder, DbContext dbContext, Type dbContextLocator)
    {
    }
}

/// <summary>
///     文件存储类型
/// </summary>
public enum FileLocationType
{
    本地 = 0,
    阿里云 = 1,
    腾讯云 = 2,
    华为云 = 3
}